package service;

import java.util.List;

import table.ShrekUser;

import dao.ShrekUserDAO;

public class LoginService implements IloginService{
	private ShrekUserDAO shrekuserDAO;
	
	public ShrekUserDAO getShrekUserDAO() {
		return shrekuserDAO;
	}

	public void setShrekUserDAO(ShrekUserDAO shrekuserdao) {
		shrekuserDAO = shrekuserdao;
	}
	
	public boolean isUser(String email, String password) {
		if ("root123".equals(password.trim()) && email.equals("root@root.com")) {
			return true;
		}
		return false;
	}

	public List<ShrekUser> userInfo() {
		// TODO Auto-generated method stub
//		return customerDAO.findAll();
		return shrekuserDAO.findAll();
	}
}